package com.ktjy.mapper;

import com.ktjy.pojo.Flower;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface FlowerMapper {
    /**
     * 根据花卉名称查询
     * @param flowerName
     * @return
     */
    public List<Flower> selectFlower(@Param("flowerName") String flowerName,
                                     @Param("flowerNumber") Integer flowerNumber,
                                     @Param("pageBegin") Integer pageBegin,
                                     @Param("pageSize") Integer pageSize);

    /**
     * 新增
     * @param flower
     * @return
     */
    public int insertFlower(Flower flower);

    /**
     * 修改
     * @param flower
     * @return
     */
    public int updateFlower(Flower flower);

    /**
     * 详情
     * @param flowerId
     * @return
     */
    public Flower flowerDetail(Integer flowerId);

    /**
     * 根据ID删除
     * @param flowerId
     * @return
     */
    public int deleteFlower(Integer flowerId);


    public int select(@Param("flowerName") String flowerName,
                      @Param("flowerNumber") Integer flowerNumber);
}
